#include <tchar.h>


//creates new thread, log window
//returns created window handle
//the created window should manage TLM_LOG (WM_USER+0) to receive log messages
//extern "C" HWND __stdcall tracelog_start(char*parm,int mask, char*outLog);


//add a new ASCII message to the log
extern "C" BOOL __stdcall tracelog_addA( int mask, char * obj, char * msg);

	
//add a new Unicode message to the log
extern "C" BOOL __stdcall tracelog_add( int mask, _TCHAR * obj, _TCHAR * msg);
	
//destroy thread, log window, free ressources
extern "C" int  __stdcall tracelog_stop();

//specially for the PROCESS_DETACH
//forse to free resources
int tracelog_terminate();

//reads tmp buffer, looks for items corresponding to the mask
//and adds them to the list view
//returns item count was read from buffer
int tracelog_read(HWND hwndLV);

//resets the read pointer for the buffer to the begining of it
BOOL tracelog_rewind();

//returns display information by mask
_TCHAR * getMaskInfo(unsigned int mask);

//returns current(window) maskSet
unsigned long getMaskSet();

//sets current(window) maskSet
unsigned long setMaskSet(unsigned long i);

unsigned long getBasicMaskSet();
BOOL getShowTraceLog();

#ifndef NUMTCHARS
#define NUMTCHARS(x)	sizeof(x)/sizeof(TCHAR)
#endif
